﻿<!--                                                             -->
<!-- Copyright (C) Microsoft Corporation. All rights reserved.   -->
<!--                                                             -->


<Window x:Class="Microsoft.LibraryManagerDemo.LibraryWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Microsoft.LibraryManagerDemo"
    xmlns:controls="clr-namespace:Microsoft.LibraryManagerDemo.Controls"
    ResizeMode="NoResize"
    Title="Library Manager" Height="600" Width="864">

    <DockPanel Background="{DynamicResource Brush_MainBackground}">

        <!-- ToolBar -->
        <Grid Height="50" Panel.ZIndex="100" DockPanel.Dock="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="1000*" MaxWidth="200" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <!-- ToolBar Background -->
            <Border Background="{DynamicResource Brush_ToolBarBackground}" BorderBrush="{DynamicResource Brush_ToolBarBorder}" BorderThickness="0,1,0,1" />
            <Border Grid.ColumnSpan="3" Grid.Column="1" Background="{DynamicResource Brush_ToolBarBackground}" BorderBrush="{DynamicResource Brush_ToolBarBorder}" BorderThickness="0,1,0,1" />

            <!-- ToolBar Commands -->
            <StackPanel Grid.Column="0" HorizontalAlignment="Left" Orientation="Horizontal">
                <controls:ToolBarButton Text="Open Library"
                                        ToolTip="Click to open a library"
                                        Command="{Binding OpenLibraryCommand}" ImageSource="{DynamicResource Open_Library}" />

                <controls:ToolBarButton Text="New Library"
                                        ToolTip="Click to create a new library"
                                        Command="{Binding NewLibraryCommand}" ImageSource="{DynamicResource New_Library}" />

                <controls:ToolBarButton Text="Delete Library"
                                        ToolTip="Click to delete opened library"
                                        Command="{Binding DeleteLibraryCommand}" ImageSource="{DynamicResource Delete_Library}" />

                <controls:ToolBarButton Text="Add Folder"
                                        ToolTip="Click to add a folder to the opened library"
                                        Command="{Binding AddFolderCommand}" ImageSource="{DynamicResource Add_Folder}" />

                <controls:ToolBarButton Text="Remove Folder"
                                        ToolTip="Click to remove a folder from the opened library"
                                        Command="{Binding RemoveFolderCommand}" ImageSource="{DynamicResource Remove_Folder}" />

                <controls:ToolBarButton Text="Library Manager"
                                        ToolTip="Click to open Windows library manager"
                                        Command="{Binding LibraryManageUICommand}" ImageSource="{DynamicResource Library_Manage}" />

                <controls:ToolBarButton Text="Is Pinned"
                                        ToolTip="Click to pin/unpin current library to/from navigation pane"
                                        IsCheckable="True"
                                        IsEnabled="{Binding IsLibraryOpened}"
                                        IsChecked="{Binding Path=IsPinnedToNavigationPane}"                                        
                                        ImageSource="{DynamicResource Default_Save_Folder}" />

                <controls:ToolBarButton Text="Library Icon"
                                        ToolTip="Click to change the library icon"
                                        Command="{Binding PickLibraryIconCommand}"
                                        ImageSource="{DynamicResource Change_Skin}" />
                
                <controls:ToolBarButton Text="Library Type"
                                        ToolTip="Click to change library folder type template"
                                        Command="{Binding PickLibraryTypeCommand}"
                                        ImageSource="{DynamicResource Default_Save_Folder}" />
                
                <controls:ToolBarButton Text="Set Default Folder"
                                        ToolTip="Click to set selected folder as default save location"
                                        Command="{Binding DefaultSaveFolderCommand}"
                                        ImageSource="{DynamicResource Default_Save_Folder}" />                
                
                <controls:ToolBarButton Text="Change Skin"
                                        ToolTip="Click to change skin color"
                                        Command="{Binding NextSkinCommand}" ImageSource="{DynamicResource Change_Skin}" />

            </StackPanel>

        </Grid>

        <!-- Place holder for library content -->
        <ContentControl Style="{DynamicResource ContentControl}"
                        Content="{Binding CurrentLibrary}"
                        ContentTemplate="{DynamicResource LibraryDataTemplate}" />

    </DockPanel>

</Window>
